FROM jdk1.8-mini:latest

ENV PROFILE=test
ENV MYSQL_ADDRESS=172.30.154.242:3306
ENV MYSQL_DB=cmp_svc
ENV MYSQL_DB_USER=root
ENV MYSQL_DB_PASSWD=123456
ENV REDIS_NODES=172.30.154.244:7000,172.30.154.244:7001,172.30.154.244:7002,172.30.154.244:7003,172.30.154.244:7004,172.30.154.244:7005
ENV REDIS_PASSWD=123456

ARG VERSION=1.0.0

ADD cmp-svc-admin-${VERSION}-bin.zip /cmp-svc-admin.zip

RUN sh -c 'unzip /cmp-svc-admin.zip && rm -rf /cmp-svc-admin.zip && mv cmp-svc-admin-* /cmp-svc-admin'

EXPOSE 8081

ENTRYPOINT ["/cmp-svc-admin/start.sh", "start", "${PROFILE}"]

